package com.scoressystem.service.imply;

import com.scoressystem.mapper.StudentMapper;
import com.scoressystem.pojo.ScoreBean;
import com.scoressystem.pojo.Student;
import com.scoressystem.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Map;
@Service
public class StudentServiceimpl implements StudentService {
    @Autowired
    StudentMapper studentmapper;
    @Override
    public List<Student> SelectAllStudentBypage(Map<String, Object> map) {
        return studentmapper.SelectAllStudentBypage(map);
    }

    @Override
    public long SelectAllStudentCount(Map<String, Object> map) {
        return studentmapper.SelectAllStudentCount(map);
    }

    @Override
    public Integer insertStudent(Student student) {
        return studentmapper.insertStudent(student);
    }

    @Override
    public int searchAllByStuNoInt(Student student) {
        return studentmapper.searchAllByStuNoInt(student);
    }

    @Override
    public int updateStudent(Student student) {
        return studentmapper.updateStudent(student);
    }

    @Override
    public int deleteByStuNoInt(Student student) {
        return studentmapper.deleteByStuNoInt(student);
    }

    @Override
    public List<Student> selectAllStudentBydel() {
        return studentmapper.selectAllStudentBydel();
    }

    @Override
    public Student selectStudentlogin(String stuNo, String stuPass) {
        return studentmapper.selectStudentlogin(stuNo,stuPass);
    }

    @Override
    public List<ScoreBean> selectAllScorebean(String stuId) {
        return studentmapper.selectAllScorebean(stuId);
    }

    @Override
    public Integer updateStudentpass(String stuPass, String stuNo) {
        return studentmapper.updateStudentpass(stuPass,stuNo);
    }

    public void setStudentmapper(StudentMapper studentmapper) {
        this.studentmapper = studentmapper;
    }
}
